<div class="contentBox" id="forms">
            <div class="contentBoxTop">
              <h3>Form Add Product</h3>
            </div>
            <div class="innerContent" id="box-1">
                <?php foreach ($list_product as $pro) { ?>
                <form id="form1" name="form1" method="post" action="" enctype="multipart/form-data">
                Category Name
                <br />
                <label class="smallInput">
                    <input name="name" type="text" size="28" value="<?php  echo $pro['pro_name'];?>"/>
                  </label>
                <p>Info<br />
                  <label class="textarea">
                    <textarea name="info" rows="6" cols="80"><?php  echo $pro['pro_info'];?></textarea>
                  </label>
                </p>
                <p>Price <br />
                  <label  class="smallInput">
                      <input type="price" name="price" value="<?php  echo $pro['pro_price'];?>"/>
                  </label> 
                </p>
                <p>Price sale <br />
                  <label  class="smallInput">
                      <input type="sale" name="sale" value="<?php  echo $pro['pro_pri_sale'];?>"/>
                  </label> 
                </p>
                <p>Country <br />
                  <label  class="smallInput">
                      <input type="text" name="country" value="<?php  echo $pro['pro_country'];?>"/>
                  </label> 
                </p>
                <p>Brand <br />
                  <label  class="smallInput">
                     
                      <select name="brand" style="width: 170px;">
                          
                        <?php foreach ($list_brand as $brand) {?>
                        <?php  if($pro['bra_id']==$brand['bra_id']) 
                                      {
                                          $select = 'selected="selected"';
                                      }
                                      else
                                      {
                                          $select ='';
                                      }
                        ?> 
                                    <option value="<?php echo $brand['bra_id'];?>" <?php  echo $select; ?>><?php echo $brand['bra_name'] ;?></option>
                          <?php } ?>
                      </select>
                  </label>
                </p>
                <p>Category <br />
                   
                    <?php foreach ($list_cate as $cate) {
                        $check ='';
                        foreach ($cate_pro as $cpro) {
                            
                            if($cate['cate_id']==$cpro['cate_id']) 
                            {
                                $check = 'checked="checked"';
                            }
                            
                    } 
                    ?>
                    
                    <input type="checkbox" <?php  echo $check; ?> name="category[]" value="<?php echo $cate['cate_id'];?>"> <?php echo $cate['cate_name']."<br/>";?> 
                    <?php 
                    }?>
                </p>
                <p>Image main <br />
                    <input type="file" name="img_main"> <br/><br/>
                    <?php foreach ($imgs as $img) {
                        if($img['pro_img_main'] == 1)
                        {
                            echo "<img src = '{$img['pro_img_src']}' height='150' width='150'>";
                        }
                    }?>
                </p>
                <p>Images <br />
                    <input type="file" name="imgs[]" multiple="multiple"> <br/><br/>
                    <?php foreach ($imgs as $img) {
                        if($img['pro_img_main'] == 0)
                        {
                            echo "<img src = '{$img['pro_img_src']}' height='100' width='100' style='margin-left: 20px;'>";
                        }
                    }?>
                </p>
                
                <p>
			<input name="" type="image" src="<?php echo $baseURL;?>/publics/admin/images/bt_submit.gif" />
                </p>
              </form>
                <?php } ?>
            </div><!--end of #box-1-->
            <div class="innerContent" id="box-2" style="display:none">
            Box-2 content goes here
            </div><!--end of #box-2-->
            
          </div>
<hr />
         
          <div class="errorBox"><div class="errorBoxTop">&nbsp;</div>
              <div class="msgBoxContent errorIcon">
                <p>Error. Product edit failed. </p>
                
                <p><?php echo form_error("name");?></p>
                <p><?php echo form_error("info");?></p>
                <p><?php echo form_error("price");?></p>
                <p><?php echo form_error("sale");?></p>
                <p><?php echo form_error("country");?></p>
                
                <p><?php echo form_error("category[]");?></p>
                <p><?php echo form_error("img_main");?></p>
                
              </div>
          </div>
          <div class="successBox">
          <div class="successBoxTop">&nbsp;</div>
              
          </div>
        
          <hr />



